package com.hyx.spring.config;

import com.hyx.spring.bean.Person;
import com.hyx.spring.bean.PersonOne;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

/**
 * @Author hyx
 * @Description 测试自定义@Scope注解设置的作用域
 * @Date 2024/3/10 22:34
 * @Version 1.0
 */
@Configuration
public class PersonConfig3 {

    @Scope("thread")
    @Bean("person")
    public PersonOne person(){
        System.out.println("给容器中添加person。。。。。");
        return new PersonOne("binghe002",28);
    }
}
